from solver.solver import Solver


class SolverWay(object):
    def __init__(self, my_solver):
        assert isinstance(my_solver, Solver), "please check your solver type"
        self.my_solver = my_solver

    def run(self):
        self.before_run_handle()
        self.my_solver.solve()
        self.after_run_handle()
        self.my_solver.write_ans()

    def before_run_handle(self):
        pass

    def after_run_handle(self):
        pass
